package com.mbc.hr.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

@SuppressWarnings("serial")
@Entity
@Table(name="HR_LeaveSchemeDetail")
@NamedQueries({
	@NamedQuery(name="LeaveSchemeDetail.findAll",query="SELECT lsd FROM LeaveSchemeDetail lsd"),
	@NamedQuery(name="LeaveSchemeDetail.findAllByLeaveScheme",query="SELECT lsd FROM LeaveSchemeDetail lsd WHERE lsd.leaveSchemeID = :leaveSchemeID"),
	@NamedQuery(name="LeaveSchemeDetail.findAllByLeaveSchemeWithLeaveTypeName",query="SELECT lsd, lt.name FROM LeaveSchemeDetail lsd, LeaveType lt WHERE lsd.leaveTypeID = lt.leaveTypeID AND lsd.leaveSchemeID = :leaveSchemeID"),
	@NamedQuery(name="LeaveSchemeDetail.findByLeaveSchemeLeaveType",query="SELECT lsd FROM LeaveSchemeDetail lsd WHERE lsd.leaveSchemeID = :leaveSchemeID AND lsd.leaveTypeID = :leaveTypeID"),
	@NamedQuery(name="LeaveSchemeDetail.deleteByLeaveScheme",query="DELETE FROM LeaveSchemeDetail lsd WHERE lsd.leaveSchemeID = :leaveSchemeID")
})
public class LeaveSchemeDetail implements Serializable {

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private long autoKey;
	private long leaveSchemeID;
	private long leaveTypeID;
	private Integer daysPerYear;
	private Integer daysPerMonth;
	private Boolean leaveTransfer;
	@Transient
	private String leaveTypeName;
	
	public String getLeaveTypeName() {
		return leaveTypeName;
	}

	public void setLeaveTypeName(String leaveTypeName) {
		this.leaveTypeName = leaveTypeName;
	}

	public long getAutoKey() {
		return autoKey;
	}

	public void setAutoKey(long autoKey) {
		this.autoKey = autoKey;
	}
	
	public long getLeaveSchemeID() {
		return leaveSchemeID;
	}

	public void setLeaveSchemeID(long leaveSchemeID) {
		this.leaveSchemeID = leaveSchemeID;
	}

	public Integer getDaysPerYear(){
		return daysPerYear;
	}

	public void setDaysPerYear(Integer daysPerYear){
		this.daysPerYear = daysPerYear;
	}

	public Integer getDaysPerMonth(){
		return daysPerMonth;
	}

	public void setDaysPerMonth(Integer daysPerMonth){
		this.daysPerMonth = daysPerMonth;
	}

	public Boolean getLeaveTransfer(){
		return leaveTransfer;
	}

	public void setLeaveTransfer(Boolean leaveTransfer){
		this.leaveTransfer = leaveTransfer;
	}

	public long getLeaveTypeID() {
		return leaveTypeID;
	}

	public void setLeaveTypeID(long leaveTypeID) {
		this.leaveTypeID = leaveTypeID;
	}


}
